<?xml version="1.0" encoding="utf-8"?>

<project>
  <modelVersion>4.0.0</modelVersion>
  <groupId>org.joseki</groupId>
  <artifactId>joseki</artifactId>
  <packaging>jar</packaging>
  <name>Joseki</name>
  <version>3.4.0</version>
  <description/>
  <url>http://joseki.org/</url>

  <organization>
    <name>Hewlett-Packard</name>
    <url>http://www.hp.com/</url>
  </organization>

  <licenses>
    <license>
      <name>BSD-style license</name>
      <url>http://joseki.org/license.html</url>
    </license>
  </licenses>

  <scm>
    <connection>scm:cvs:pserver:anonymous@joseki.cvs.sourceforge.net:/cvsroot/joseki:Joseki3</connection>
    <url>http://jena.svn.sourceforge.net/</url>
  </scm>

  <dependencies>

    <!-- References Jena -->
     <dependency>
      <groupId>com.hp.hpl.jena</groupId>
      <artifactId>arq</artifactId>
      <version>2.8.0</version>
    </dependency>

    <dependency>
      <groupId>com.hp.hpl.jena</groupId>
      <artifactId>arq</artifactId>
      <version>2.8.0</version>
      <type>test-jar</type>
    </dependency>

    <!-- Jena: Even though ARQ is included above, need Jena dependency to 
         pull in all Jena's dependences to run tests
    -->

    <dependency>
      <groupId>com.hp.hpl.jena</groupId>
      <artifactId>jena</artifactId>
      <version>2.6.0</version>
    </dependency>

    <dependency>
      <groupId>com.hp.hpl.jena</groupId>
      <artifactId>jenatest</artifactId>
      <version>2.6.0</version>
    </dependency>

    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.5</version>
    </dependency>

    <dependency>
      <groupId>org.mortbay.jetty</groupId>
      <artifactId>jetty</artifactId>
      <version>6.1.10</version>
    </dependency>    

     <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
      <version>1.5.6</version>
    </dependency>

     <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-log4j12</artifactId>
      <version>1.5.6</version>
    </dependency>

    <!-- Needed because the Joseki test suite resets logging levels -->
    <dependency>
      <groupId>log4j</groupId>
      <artifactId>log4j</artifactId>
      <version>1.2.12</version>
    </dependency>

    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>servlet-api</artifactId>
      <version>2.5</version>
    </dependency>

  </dependencies>

  <build>
    <sourceDirectory>src</sourceDirectory>
    <testSourceDirectory>src-test</testSourceDirectory>
    
    <resources>
      <resource>
        <targetPath>org/joseki</targetPath>
        <filtering>true</filtering>
        <directory>resources</directory>
      </resource>
    </resources>
    <filters>
      <filter>${basedir}/target/filter.properties</filter>
    </filters>
    
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <source>1.6</source>
          <target>1.6</target>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <executions> 
          <execution>
            <id>attach-sources</id>
            <phase>verify</phase>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <skip>true</skip>
          <includes>
            <include>org/joseki/test/JosekiTests.java</include>
            <!-- Needs access to the script files -->
            <!-- <include>org/joseki/test/ProtocolTests.java</include> -->
          </includes>
        </configuration>
      </plugin>
      

      <!-- No javadoc shipped (it's not a library!)
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <executions>
          <execution>
            <id>attach-javadocs</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      -->

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-assembly-plugin</artifactId>
        <configuration>
          <descriptors>
            <descriptor>assembly.xml</descriptor>
          </descriptors>
        </configuration>

        <!-- Add to packaging lifecycle phase -->
        <executions>
          <execution>
            <id>create-assembly</id>
            <phase>verify</phase>
            <goals>
              <goal>attached</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-resources-plugin</artifactId>
        <configuration>
          <encoding>UTF-8</encoding>
        </configuration>
      </plugin>
      
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-antrun-plugin</artifactId>
        <executions>
          <execution>
            <id>ant-generate-resources</id>
            <phase>generate-resources</phase>
            <configuration>
              <tasks>
                <mkdir dir="${basedir}/target"/>
                <tstamp>
                  <format property="build.time.xsd"  pattern="yyyy-MM-dd'T'HH:mm:ssZ"/>
                  <format property="build.time.txt"  pattern="yyyy-MM-dd HH:mm Z"/>
                </tstamp>
                <echo file="${basedir}/target/filter.properties">
#begin
build.time.xsd=${build.time.xsd}
build.time.txt=${build.time.txt}
#end 
                </echo>
                <echo message="build.time=${build.time.txt}"/>
              </tasks>
            </configuration>
            <goals>
              <goal>run</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
 
    </plugins>

  </build>
      
  <distributionManagement>
    <downloadUrl>http://jena.hpl.hp.com/repo-dev</downloadUrl>
    <repository>
      <id>jena-repo</id>
      <name>Jena repo</name>
      <!-- scp does not work (TERM not set !!) -->
      <url>sftp://jena.hpl.hp.com/var/repo-dev</url>
      <!--<url>file:tmp</url>-->
      <layout>default</layout>
    </repository> 
    <snapshotRepository>
      <id>jena-repo-dev</id>
      <name>Jena development repo</name>
      <!-- scp does not work (TERM not set !!) -->
      <url>sftp://jena.hpl.hp.com/var/repo-dev</url>
      <!--<url>file:tmp</url>-->
      <layout>default</layout>
    </snapshotRepository>
  </distributionManagement>

</project>
